package com.wpp.Controller;


import com.wpp.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/user")
public class controllerTest {


    @RequestMapping("/test1")
    public ModelAndView test1() {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("succes");
        return mv;
    }

    @RequestMapping("/test2")
    public ModelAndView test2(String name, int age) {
        ModelAndView mv = new ModelAndView();
        System.out.println("name" + name + "========" + "age" + age);
        mv.setViewName("succes");
        return mv;
    }

    @RequestMapping("/test3")
    public ModelAndView test3(User user) {
        ModelAndView mv = new ModelAndView();
        System.out.println(user);
        mv.setViewName("succes");
        return mv;
    }


}
